package POJO;

import java.util.HashSet;
import java.util.Set;

public class Enseignement {
	private long id;
	private Master master;
	private String intitule;
	private String description;
	private Set<Inscription> inscriptions = new HashSet<Inscription>();

	public Enseignement(){}
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Master getMaster() {
		return master;
	}

	public void setMaster(Master master) {
		this.master = master;
	}

	public String getIntitule() {
		return intitule;
	}

	public void setIntitule(String intitule) {
		this.intitule = intitule;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Set<Inscription> getInscriptions() {
		return inscriptions;
	}

	public void setInscriptions(Set<Inscription> inscriptions) {
		this.inscriptions = inscriptions;
	}

	public void addInscription(Inscription i){
		inscriptions.add(i);
	}
	public void removeInscription(Inscription i){
		inscriptions.remove(i);
	}

	@Override
	public String toString() {
		return "Enseignement [id=" + id + ", master=" + master + ", intitule="
				+ intitule +"]\n";
	}	
}
